package com.example.supermarket.mapper;

import com.example.supermarket.entity.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>管理员表映射器</p>
 * @author Bosen
 * @date 2021/10/8 16:25
 */
@Repository
@Mapper
public interface AdminMapper {
    /**
     * <p>通过管理员id获取管理员信息</p>
     * @param id 管理员id
     */
    @Select("select id, name, password from admin where id = #{id}")
    Admin findById(int id);
}
